﻿package mortal.game.view.rebate.openNewSerSevenDay.panels
{
    import Message.Public.*;
    import com.mui.controls.*;
    import mortal.game.manager.window3d.*;
    import mortal.game.view.common.*;
    import mortal.game.view.rebate.openNewSerSevenDay.items.*;
    import mortal.game.view.rebate.openServerSevenDay.data.*;
    import mortal.game.view.rebate.rank.*;

    public class OpenNewSerSevInfoPanel extends GSprite
    {
        private var _window:IWindow3D;
        protected var _top:OpenNewSerSevTop;
        private var _cell0:OpenNewSerSevCell0;
        private var _cellArr:Array;
        private var _len:int = 3;
        private var _mid:OpenNewSerSevMid;
        private var _bottom:OpenNewSerSevBottom;

        public function OpenNewSerSevInfoPanel(param1:IWindow3D)
        {
            this._window = param1;
            return;
        }// end function

        override protected function createDisposedChildrenImpl() : void
        {
            super.createDisposedChildrenImpl();
            this._top = UIFactory.getUICompoment(OpenNewSerSevTop, 0, 0, this);
            this._mid = UIFactory.getUICompoment(OpenNewSerSevMid, 205, 123, this._window.contentTopOf3DSprite, this._window);
            this._bottom = UIFactory.getUICompoment(OpenNewSerSevBottom, 17, 278, this);
            return;
        }// end function

        override protected function disposeImpl(param1:Boolean = true) : void
        {
            var _loc_2:int = 0;
            var _loc_3:GSprite = null;
            this._top.dispose(param1);
            this._top = null;
            this._mid.dispose(param1);
            this._mid = null;
            this._bottom.dispose(param1);
            this._bottom = null;
            if (this._cellArr)
            {
                _loc_2 = 0;
                while (_loc_2 < this._len)
                {
                    
                    _loc_3 = this._cellArr[_loc_2];
                    _loc_3.dispose(param1);
                    _loc_2++;
                }
            }
            this._cellArr = null;
            super.disposeImpl(param1);
            return;
        }// end function

        public function updateInfo(param1:Object, param2:int) : void
        {
            RebateRankPanel.dayNumOut = param1.dayNum;
            this._top.updateTop(param1, param2);
            this._mid.upateInfo(param1.dayNum);
            this._bottom.updateBottomByDayNum(param1.dayNum);
            return;
        }// end function

        public function updateRole(param1:SToplist, param2:int) : void
        {
            return;
        }// end function

        public function initCell0(param1:int) : void
        {
            return;
        }// end function

        private function updateRw(param1:Object) : void
        {
            var _loc_7:GSprite = null;
            var _loc_8:Array = null;
            var _loc_2:* = param1.dayNum;
            var _loc_3:* = OpenServerSevenDayUtil.getRewardsByDay(_loc_2);
            if (_loc_3 == null)
            {
                return;
            }
            var _loc_4:* = _loc_3[0];
            var _loc_5:int = 0;
            while (_loc_5 < _loc_4.length && this._cellArr.length)
            {
                
                _loc_7 = this._cellArr[_loc_5];
                if (_loc_7)
                {
                    _loc_8 = _loc_4[_loc_5];
                    var _loc_9:* = _loc_7;
                    _loc_9._loc_7["updateRw"](_loc_5, _loc_8);
                }
                _loc_5++;
            }
            var _loc_6:* = _loc_3[1];
            return;
        }// end function

        public function updateGetBtn() : void
        {
            return;
        }// end function

    }
}
